﻿<%@ Page Title="" Language="C#" MasterPageFile="~/studentUser/Student.Master" AutoEventWireup="true" CodeBehind="Liusushenqing.aspx.cs" Inherits="WebApplication1.studentUser.Liusushenqing" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
         <div style="border-radius: 15px;
            position: relative;
            margin-top:15px;
            margin-right:50px;
            float:right;">
            <asp:Button ID="Button2" runat="server" Text="申请" BackColor="green" ForeColor="White" Font-Size="15px" Height="37px" Width="82px" OnClick="Button2_Click"/>
        </div>

        <asp:GridView PageSize=11 ID="GridView1" runat="server" CellSpacing="10"  AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="id" DataSourceID="liqin" ForeColor="#333333" GridLines="None" HorizontalAlign="Center" Width="100%" OnSelectedIndexChanged="GridView1_SelectedIndexChanged">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:TemplateField HeaderText ="序号" InsertVisible="False">
                    <ItemStyle HorizontalAlign="Center" />
                    <HeaderStyle HorizontalAlign="Center" />
                     <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# this.GridView1.PageIndex * this.GridView1.PageSize + this.GridView1.Rows.Count + 1%>'/>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="phone" HeaderText="电话" SortExpression="phone" />
                <asp:BoundField DataField="time" HeaderText="申请时间" SortExpression="time" />
                <asp:BoundField DataField="state" HeaderText="审核状态" SortExpression="state" />
                <asp:BoundField DataField="reviewer" HeaderText="审核人" SortExpression="reviewer" />
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
        <asp:SqlDataSource ID="liqin" runat="server" ConnectionString="<%$ ConnectionStrings:dmsConnectionString %>" ProviderName="<%$ ConnectionStrings:dmsConnectionString.ProviderName %>" SelectCommand="SELECT state, phone, time, reviewer FROM out_and_stay_application where type = 1"></asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource3" runat="server"></asp:SqlDataSource>

    <asp:Panel ID="Panel1" runat="server" Width="600px" Height="380px">
     <div style="border-radius: 15px;
            border:groove;
    background-color: #fff;
    position:relative;
    margin-left: -100px;
    width: 600px;
    height: 400px;
    top:100px;
    margin-left: 580px;
    box-shadow: 0px 1px 3px 0px rgba(119,119,119,0.99);">
     <table class="auto-style4" style=" margin: 0 auto;font-size:large;position: relative;top:15px">
        <tr>
            <td colspan="2"  align="center" style="font-size:x-large"">留宿申请</td>
        </tr>
        <tr>
            <td class="auto-style5" align="right">姓名：</td>
            <td>
                <asp:TextBox ID="name" runat="server" Height="25px" Width="300px"></asp:TextBox>
                 <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="name" ErrorMessage="名字不能为空" ForeColor="#CC3300"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="auto-style5" align="right">班级：</td>
            <td>
                <asp:TextBox ID="classname" runat="server" Height="25px" Width="300px"></asp:TextBox>
                 <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="classname" ErrorMessage="班级不能为空" ForeColor="#CC3300"></asp:RequiredFieldValidator>
            </td>
        </tr>
         <tr>
            <td class="auto-style4" align="right" Width="300px">宿舍楼：</td>
            <td class="auto-style4">
                <asp:DropDownList ID="DropDownList2" Width="310px" runat="server" AutoPostBack="True" Height="29px"  DataSourceID="SqlDataSource2" DataTextField="name" DataValueField="name">
                </asp:DropDownList>
                <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:dmsConnectionString %>" ProviderName="<%$ ConnectionStrings:dmsConnectionString.ProviderName %>" SelectCommand="select name from hostel"></asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td class="auto-style5" align="right">宿舍号：</td>
            <td>
                <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" Height="29px" Width="310px" DataSourceID="SqlDataSource1" DataTextField="dormitory_number" DataValueField="dormitory_number">
                </asp:DropDownList>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:dmsConnectionString %>" ProviderName="<%$ ConnectionStrings:dmsConnectionString.ProviderName %>" SelectCommand="select dormitory_number from dormitory"></asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td class="auto-style5" align="right">手机号：</td>
            <td>
                <asp:TextBox ID="phonenumber" runat="server" MaxLength="11" TextMode="Phone" Height="25px" Width="300px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="phonenumber" ErrorMessage="手机号不能为空" ForeColor="#CC3300"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="auto-style5" align="right">申请留宿原因：</td>
            <td>
                <asp:TextBox ID="reason" runat="server" BorderStyle="Solid" Height="74px" TextMode="MultiLine" Width="441px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="reason" ErrorMessage="申请留宿原因不能为空" ForeColor="#CC3300"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="auto-style5" colspan="2" align="center">
                <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="提交" />&nbsp&nbsp&nbsp&nbsp
                <asp:Button ID="Button3" runat="server" OnClick="Button3_Click" CausesValidation="false" Text="取消" />
            </td>
        </tr>
    </table>
        </div>
         </asp:Panel>
</asp:Content>
